package ShoppingMall;

public class Market {
    private String  marketName;
    private Product[] productArr;  
    public void setMarketName(String marketName){
        this.marketName = marketName; //do nothing,just for quote that method 
    }
    public String getMarketName(){
        return marketName;
    }
    public void setProductArr(Product[] productArr){
        this.productArr = productArr;
    }
    public Product[] getProductArr(){
        return productArr; 
    }
    Product sell(String name){ //why the front don't have public?if it only can use in this class
        for (int i = 0;i<productArr.length;i++){
            if (productArr[i].getProName() == name){
                return productArr[i];
            }
        }
        return null; 
    }
}
